<div class="container">
    <h1 id="pkg-overview">package cmplx</h1>
    <p><code>import "math/cmplx"</code>
    </p><p>cmplx包提供了复数的常用常数和常用函数。</p>
    
    
		
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    <h2 id="NaN">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/isnan.go?name=release#22" title="View Source">NaN</a> </h2>
    <pre class="funcdecl">func NaN() <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回一个复数的“Not A Number”值。</p>
    <h2 id="IsNaN">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/isnan.go?name=release#11" title="View Source">IsNaN</a> </h2>
    <pre class="funcdecl">func IsNaN(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#bool">bool</a></pre>
    <p>如果x的实部或者虚部是“Not A Number”值，则返回真。</p>
    <h2 id="Inf">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/isinf.go?name=release#18" title="View Source">Inf</a> </h2>
    <pre class="funcdecl">func Inf() <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回一个复数的无穷大，complex(+Inf, +Inf)。</p>
    <h2 id="IsInf">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/isinf.go?name=release#10" title="View Source">IsInf</a> </h2>
    <pre class="funcdecl">func IsInf(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#bool">bool</a></pre>
    <p>如果x的实部或者虚部是无穷（不管正负），则返回真。</p>
    <h2 id="Abs">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/abs.go?name=release#12" title="View Source">Abs</a> </h2>
    <pre class="funcdecl">func Abs(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#float64">float64</a></pre>
    <p>返回x的绝对值（也被称为模）。</p>
    <h2 id="Phase">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/phase.go?name=release#11" title="View Source">Phase</a> </h2>
    <pre class="funcdecl">func Phase(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#float64">float64</a></pre>
    <p>返回x的相位（也被称为幅角），返回值范围[-Pi, Pi]。</p>
    <h2 id="Polar">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/polar.go?name=release#10" title="View Source">Polar</a> </h2>
    <pre class="funcdecl">func Polar(x <a href="builtin.htm#complex128">complex128</a>) (r, θ <a href="builtin.htm#float64">float64</a>)</pre>
    <p>将直角坐标的复数表示为极坐标(r, θ)。其中r是x的绝对值，θ是x的相位，范围[-Pi, Pi]。</p>
    <h2 id="Rect">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/rect.go?name=release#10" title="View Source">Rect</a> </h2>
    <pre class="funcdecl">func Rect(r, θ <a href="builtin.htm#float64">float64</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回极坐标(r, θ)表示的复数。</p>
    <h2 id="Conj">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/conj.go?name=release#8" title="View Source">Conj</a> </h2>
    <pre class="funcdecl">func Conj(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回x的共轭复数（实部相等，虚部相反）。</p>
    <h2 id="Sqrt">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/sqrt.go?name=release#58" title="View Source">Sqrt</a> </h2>
    <pre class="funcdecl">func Sqrt(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回x的平方根。返回值的实部不小于0，而虚部的正负号和x的虚部相同。</p>
    <h2 id="Log">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/log.go?name=release#57" title="View Source">Log</a> </h2>
    <pre class="funcdecl">func Log(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回x的自然对数。</p>
    <h2 id="Log10">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/log.go?name=release#62" title="View Source">Log10</a> </h2>
    <pre class="funcdecl">func Log10(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回x的常用对数。</p>
    <h2 id="Exp">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/exp.go?name=release#51" title="View Source">Exp</a> </h2>
    <pre class="funcdecl">func Exp(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回e**x。</p>
    <h2 id="Pow">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/pow.go?name=release#49" title="View Source">Pow</a> </h2>
    <pre class="funcdecl">func Pow(x, y <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>返回x**y；有如下特例：</p>
    <pre>Pow(0, ±0)  returns 1+0i
Pow(0, c)   如果image(c)==0，则当real(c)&lt;0时返回Inf+0i；否则返回Inf+Inf i
</pre>
    <h2 id="Sin">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/sin.go?name=release#53" title="View Source">Sin</a> </h2>
    <pre class="funcdecl">func Sin(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求正弦。</p>
    <h2 id="Cos">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/sin.go?name=release#98" title="View Source">Cos</a> </h2>
    <pre class="funcdecl">func Cos(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求余弦。</p>
    <h2 id="Tan">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/tan.go?name=release#59" title="View Source">Tan</a> </h2>
    <pre class="funcdecl">func Tan(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求正切。</p>
    <h2 id="Cot">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/tan.go?name=release#175" title="View Source">Cot</a> </h2>
    <pre class="funcdecl">func Cot(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求余切。</p>
    <h2 id="Asin">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#51" title="View Source">Asin</a> </h2>
    <pre class="funcdecl">func Asin(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反正弦。</p>
    <h2 id="Acos">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#94" title="View Source">Acos</a> </h2>
    <pre class="funcdecl">func Acos(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反余弦。</p>
    <h2 id="Atan">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#142" title="View Source">Atan</a> </h2>
    <pre class="funcdecl">func Atan(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反正切。</p>
    <h2 id="Sinh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/sin.go?name=release#73" title="View Source">Sinh</a> </h2>
    <pre class="funcdecl">func Sinh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求双曲正弦。</p>
    <h2 id="Cosh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/sin.go?name=release#117" title="View Source">Cosh</a> </h2>
    <pre class="funcdecl">func Cosh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求双曲余弦。</p>
    <h2 id="Tanh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/tan.go?name=release#83" title="View Source">Tanh</a> </h2>
    <pre class="funcdecl">func Tanh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求双曲正切。</p>
    <h2 id="Asinh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#67" title="View Source">Asinh</a> </h2>
    <pre class="funcdecl">func Asinh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反双曲正弦。</p>
    <h2 id="Acosh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#100" title="View Source">Acosh</a> </h2>
    <pre class="funcdecl">func Acosh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反双曲余弦。</p>
    <h2 id="Atanh">func <a href="https://github.com/golang/go/blob/master/src/math/cmplx/asin.go?name=release#166" title="View Source">Atanh</a> </h2>
    <pre class="funcdecl">func Atanh(x <a href="builtin.htm#complex128">complex128</a>) <a href="builtin.htm#complex128">complex128</a></pre>
    <p>求反双曲正切。</p>
</div>